<aside id="sidebar">
<?php 
global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }}
	foundation_above_primary(); 
    if ($fd_custom_search == "Enable" && $fd_custom_search_placement == "Above Primary Widget"){
		foundation_custom_search_area();
	}
?>
<?php if ( is_sidebar_active('primary-widget-area') ) : ?>
		<div id="primary" class="widget-area">
			<ul class="xoxo">
				<?php dynamic_sidebar('primary-widget-area'); ?>
			</ul>
		</div><!-- #primary .widget-area -->
<?php endif; 
	
	foundation_above_secondary();
	
?>		
		
<?php if ( is_sidebar_active('secondary-widget-area') ) : ?>
		<div id="secondary" class="widget-area">
			<ul class="xoxo">
				<?php dynamic_sidebar('secondary-widget-area'); ?>
			</ul>
		</div><!-- #secondary .widget-area -->
<?php endif; 

	foundation_below_secondary();
	foundation_sidebar_column_left();
	foundation_sidebar_column_right();
?>
</aside><!-- .eof #sidebar -->